package com.example.video.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.video.entity.Schedule;
import com.example.video.mapper.ScheduleMapper;
import com.example.video.service.IScheduleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author qiusuyang
 * @since 2024-06-30
 */
@Service
public class ScheduleServiceImpl extends ServiceImpl<ScheduleMapper, Schedule> implements IScheduleService {

    @Resource
    private ScheduleMapper mapper;

    @Override
    public Schedule getItemByRole(String role) {
        return mapper.selectOne(new QueryWrapper<Schedule>().eq("role",role));
    }
}
